<!--
档案管理-档案管理查询
 add by yyp 2020-01-10
-->
<template lang="pug">
  kalix-search(:searchFields="searchFields" title="档案管理查询" bizKey="File")
</template>

<script type="text/ecmascript-6">
  export default {
    name: 'fileSearch',
    data() {
      return {
        searchFields: [
          {
            label: '档案分类',
            type: 'select',
            prop: 'cid',
            options: []
          },
          {label: '病患姓名 :', prop: 'name'}
        ]
      }
    },
    mounted() {
      this.getClassName()
    },
    methods: {
      getClassName() {
        this.axios.request({
          method: 'GET',
          url: '/camel/rest/telemedicine/classs'
        }).then(res => {
          if (res.data.totalCount > 0) {
            res.data.data.forEach((item) => {
              let arr = {
                value: null,
                label: null
              }
              arr.value = item.id
              arr.label = item.className
              this.searchFields[0].options.push(arr)
            })
          }
        })
      }
    }
  }
</script>

<style scoped lang="stylus" type="text/stylus">

</style>
